package com.liwy3.elasticsearch.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 商品表
 * </p>
 *
 * @author Crazy4J
 * @since 2022-09-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("tb_sku")
public class TbSkuEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 商品id
     */
    @TableId("id")
    private Long id;

    /**
     * 商品条码
     */
    @TableField("sn")
    private String sn;

    /**
     * SKU名称
     */
    @TableField("name")
    private String name;

    /**
     * 价格（分）
     */
    @TableField("price")
    private Integer price;

    /**
     * 库存数量
     */
    @TableField("num")
    private Integer num;

    /**
     * 库存预警数量
     */
    @TableField("alert_num")
    private Integer alertNum;

    /**
     * 商品图片
     */
    @TableField("image")
    private String image;

    /**
     * 商品图片列表
     */
    @TableField("images")
    private String images;

    /**
     * 重量（克）
     */
    @TableField("weight")
    private Integer weight;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;

    /**
     * SPUID
     */
    @TableField("spu_id")
    private Long spuId;

    /**
     * 类目ID
     */
    @TableField("category_id")
    private Integer categoryId;

    /**
     * 类目名称
     */
    @TableField("category_name")
    private String categoryName;

    /**
     * 品牌名称
     */
    @TableField("brand_name")
    private String brandName;

    /**
     * 规格
     */
    @TableField("spec")
    private String spec;

    /**
     * 销量
     */
    @TableField("sale_num")
    private Integer saleNum;

    /**
     * 评论数
     */
    @TableField("comment_num")
    private Integer commentNum;

    /**
     * 商品状态 1-正常，2-下架，3-删除
     */
    @TableField("status")
    private String status;


    public static final String ID = "id";

    public static final String SN = "sn";

    public static final String NAME = "name";

    public static final String PRICE = "price";

    public static final String NUM = "num";

    public static final String ALERT_NUM = "alert_num";

    public static final String IMAGE = "image";

    public static final String IMAGES = "images";

    public static final String WEIGHT = "weight";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String SPU_ID = "spu_id";

    public static final String CATEGORY_ID = "category_id";

    public static final String CATEGORY_NAME = "category_name";

    public static final String BRAND_NAME = "brand_name";

    public static final String SPEC = "spec";

    public static final String SALE_NUM = "sale_num";

    public static final String COMMENT_NUM = "comment_num";

    public static final String STATUS = "status";

}
